Skip to content

Add Netlify DB migration tooling#40

Closed
pablonete wants to merge 1 commit into
mainfrom
pablonete-add-db-migration-tooling
Closed

Add Netlify DB migration tooling#40
pablonete wants to merge 1 commit into
mainfrom
pablonete-add-db-migration-tooling

Conversation

@pablonete

Copy link
Copy Markdown
Member

This continues the Netlify DB rollout by adding the operator tooling needed to apply the schema, copy existing data into DB, and verify parity before enabling DB reads. It also simplifies backend selection so magic-link tokens always use the same storage backend as the rest of the app.

Summary

  • Adds server/db-migrate.ts with apply-schema, migrate, and verify commands.
  • Adds npm scripts for applying schema, migrating data, and verifying source-to-DB parity.
  • Supports migrating from local JSON files or Netlify Blobs via KID_A_MIGRATION_SOURCE=file|blob.
  • Verifies stable hashes and counts for conference data, kids, passports, prizes, prize awards, and magic-link tokens.
  • Removes KID_A_TOKEN_BACKEND; tokens now follow KID_A_STORE_BACKEND.
  • Documents the migration and verification commands.

Notes for review

  • This PR does not enable dual writes or DB reads by default.
  • The migration script expects NETLIFY_DATABASE_URL to point at the target Netlify DB.
  • No UI changes; screenshots are N/A.

Validation

  • npm run --silent lint
  • npm run --silent build
  • npm run --silent build:server
  • git --no-pager diff --check

Add a CLI for applying DB migrations, copying file or blob data into Netlify DB, and verifying source-to-DB parity. Simplify backend selection so magic-link tokens always use the same store backend as app data.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@netlify

netlify Bot commented Jun 24, 2026

Copy link
Copy Markdown

Deploy Preview for kid-a ready!

Name Link
🔨 Latest commit 6dc24dc
🔍 Latest deploy log https://app.netlify.com/projects/kid-a/deploys/6a3c476362677b0008d0e944
😎 Deploy Preview https://deploy-preview-40--kid-a.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@pablonete pablonete closed this Jun 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant